﻿using System;
using System.Collections.Generic;
using System.Text;

namespace UtilZ.Dotnet.Ex.Attributes
{
    /// <summary>
    /// 对象构建Id特性
    /// </summary>
    public class ObjectBuildIdAttribute : Attribute
    {
        /// <summary>
        /// 类型标识
        /// </summary>
        public object Id { get; private set; }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="id">类型标识</param>
        public ObjectBuildIdAttribute(object id)
        {
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }

            this.Id = id;
        }
    }
}
